package jude.java.money.black;

import java.util.ArrayList;
import java.util.LinkedHashMap;

import jude.java.money.sly.Keywords;
import jude.java.util.Utils;

public class RandonCode {

	private static final LinkedHashMap<String, String[]> SITES = new LinkedHashMap<String, String[]>();
	static {
		SITES.put("uggs.tk", Keywords.EN.UGG);
		SITES.put("moncler-spaccio.com", Keywords.EN.Moncler);
		SITES.put("toryburcheshop.com", Keywords.EN.ToryBurch);
		SITES.put("monclers.tk", Keywords.EN.Moncler);
		SITES.put("mbt-mbts.com", Keywords.EN.MBT);
		SITES.put("ugg-onsale.us", Keywords.EN.UGG);
		SITES.put("uggworld.org", Keywords.EN.UGG);
		SITES.put("coacheshop.com", Keywords.EN.Coach);
		SITES.put("monclers-outlet.org", Keywords.EN.Moncler);
		SITES.put("ecoachoutlet.com", Keywords.EN.Coach);
		SITES.put("ugg-forsale.com", Keywords.EN.UGG);
		SITES.put("uggfootwearoutlet.com", Keywords.EN.UGG);
		SITES.put("eghdoutlet.com", Keywords.EN.GHD);
	}

	public static void main(String[] args) {
		int n = ((int) (Math.random() * 10000)) % SITES.size();
		ArrayList<String> sites = new ArrayList<String>();
		sites.addAll(SITES.keySet());
		String site = sites.get(n);
		String[] keys = SITES.get(site);
		String keyword = keys[Utils.random(keys.length)];
		String id = "friend" + (int) (1000 * Math.random());
		System.out.println(renderCode(site, keyword, id));
	}

	private static final String renderCode(String site, String keyword,
			String id) {
		StringBuilder sb = new StringBuilder();
		sb.append("<a id=\"").append(id).append("\" title=\"").append(keyword);
		sb.append("\" href=\"http://www.").append(site).append("\">");
		sb.append(keyword).append("</a>");
		sb.append("<script type='text/javascript'>(function(){document.getElementById('");
		sb.append(id).append("').style.display='none';})();</script>");
		return sb.toString();
	}

}
